package com.cloudkinto.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cloudkinto.entity.InvoiceRecordDo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cloudkinto.extentity.InvoiceRecordDto;
import com.cloudkinto.extentity.InvoiceReviewDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 * @author hua
 * @since 2022-09-20
 */
@Mapper
public interface InvoiceRecordDao extends BaseMapper<InvoiceRecordDo> {
    List<InvoiceRecordDo> listPage(IPage<InvoiceRecordDo> page, @Param("map") Map<String, String> map);
    List<InvoiceRecordDto> listPageDto(IPage<InvoiceRecordDto> page, @Param("map") Map<String, String> map);
    String getCompanyNameById(long companyId);
    double getSumCostRecord(@Param("companyId") Long companyId);
    double getSumHadInvoiceAmount(@Param("companyId") Long companyId);

    List<InvoiceReviewDto> getInvoiceCompany();

    int getUnMatchInvoiceRecord(Long companyId, String taxNumber);
}
